Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xml attribute tidy up #4971

Merged
merged 13 commits into from Jul 1, 2014
Merged

Xml attribute tidy up #4971

merged 13 commits into from Jul 1, 2014

Conversation

jmarshallnz
Copy link
Contributor

This includes fix for possible crashes (null ptr deref) which should be backported to Gotham, plus additional fixes for not reading Attribute's into CStdString (which has null ptr protection) so that when we replace with std::string we don't introduce a bunch of further null ptr deref's.

It mostly touches various settings:

  1. Addon settings. Currently the 'type' attribute has been read case-sensitive in some spots, and case-insensitive in others. I've changed to case-sensitive everywhere.
  2. Addon settings. A few other attributes are already case-sensitive (e.g. options) so I've changed a couple others where I found them. In particular, subsetting='true', the true is case-sensitive, and where $HOURS is used, that is now case-sensitive as well.
  3. The bydate attribute of AdvancedSettings tvshow matching regexp is now case-sensitive.
  4. Skin settings. We write these to guisettings.xml, so I've made the type case-sensitive.

Otherwise, just general cleanup.

This needs to go in before the next CStdString removal, so sooner the better on reviews please!

@jmarshallnz
Copy link
Contributor Author

jenkins build this please

1 similar comment
@jmarshallnz
Copy link
Contributor Author

jenkins build this please

@Montellese
Copy link
Member

Couldn't find anything wrong. Nice cleanup/refactor.

bSort=true;

if (type)
const std::string type = XMLUtils::GetAttribute(setting, "type");

This comment was marked as spam.

@jmarshallnz
Copy link
Contributor Author

Thanks for the review! Updated as per comments.

jenkins build this please

jmarshallnz added a commit that referenced this pull request Jul 1, 2014
@jmarshallnz jmarshallnz merged commit 1406843 into xbmc:master Jul 1, 2014
@jmarshallnz jmarshallnz deleted the xml_attribute branch July 1, 2014 22:12
@MilhouseVH
Copy link
Contributor

There is a problem with PR4971 - now that this is merged, is it better to open a new issue?

Assuming the discussion can continue here, the addon Artwork Downloader is missing several label and textual elements from the Settings dialog once this PR is added.

Before #1 - without PR4971 (fde760b):
before1

After #1 - with PR4971 (a362942):
after1

Before #2 - without PR4971 (fde760b):
before2

After #2 - with PR4971 (a362942):
after2

See also here.

Given the changes made by this PR, I suppose it's equally possible that these addons that are now missing textual elements may require updating to be case-sensitive (ping @MartijnKaijser).

@jmarshallnz
Copy link
Contributor Author

Add-on settings were already case-sensitive in bits, but not case-sensitive in other bits, so yes, it needs fixing in the add-ons.

@MilhouseVH
Copy link
Contributor

This isn't due to case-insensitivity, however.

Addon Setting controls are no longer being created in GUIDialogAddonSettings.cpp unless an id property is present, which means that sep and lsep controls are now ignored by this PR (as they have no id property).

The Artwork Downloader "Info" panel above that is no longer working can be viewed here. It looks correct, and should be displayed, but isn't.

Removing the null check on id fixes this problem.

@jmarshallnz
Copy link
Contributor Author

Thanks for investigating - most useful. It's not quite as easy as removing the null check, as that's needed, but perhaps can be moved to where it's needed (we don't care about it for separator controls for example).

Will look into it.

@Mafarricos
Copy link

This problem also affects action controls, in trakt addon for example:

Screens from XBMC 13.1:
The force option:
image
The Movie and Service lsep:
image
And other lsep's:
image

Latest Helix Release for windows:
The force option is gone:
image
The Movie and Service is gone:
image
And other lsep's also gone:
image

What is needed to change in the addons so the lsep's, sep's and action controls appear after this PR?

@MilhouseVH
Copy link
Contributor

Nothing needs to change in the addons, this PR needs updating so that it doesn't ignore controls with no id property.

@Mafarricos
Copy link

OK, I understood that something could be made in the setting so the controls would appear, but that way there's nothing to do in the addon matter. Thanks, will wait for PR update.

@MilhouseVH
Copy link
Contributor

@Mafarricos - the sep/lsep issue is fixed by #5025 which is in build #0713 on the forum. If you find any problems please update #5025, thanks.

@Mafarricos
Copy link

@MilhouseVH it seems that all is fixed with this PR.
Thanks!

@MartijnKaijser MartijnKaijser added this to the Helix 14.0-alpha1 milestone Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants